import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

import { LogisticsRouter } from "../components/logistics/route.js";
import { libraryRoute } from "@/components/library/route";
import { TakeawayRouter } from "@/components/takeaway/route";

const routes = [
  {
    path: "/home",
    name: "home",
    component: HomeView,
  },
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/service",
    name: "service",
    component: () => import("../views/AllService.vue"),
  },
  {
    path: "/news",
    name: "news",
    component: () => import("../views/NewsView.vue"),
  },
  {
    path: "/mine",
    name: "mine",
    component: () => import("../views/MineView.vue"),
  },
  // 修改未上传
  {
    path: "/park/index",
    name: "parkindex",
    component: () => import("../views/park/ParkView.vue"),
  },
  {
    path: "/park/detail/:id",
    name: "parkdetail",
    component: () => import("../views/park/ParkDetail.vue"),
  },
  {
    path: "/park/list",
    name: "parklist",
    component: () => import("../views/park/ParkList.vue"),
  },
  {
    path: "/park/mine",
    name: "parkmine",
    component: () => import("../views/park/ParkMine.vue"),
  },
  {
    path: "/park/change",
    name: "parkchange",
    component: () => import("../views/park/ParkChange.vue"),
  },
  {
    path: "/edituser",
    name: "edituser",
    component: () => import("../views/EditUser.vue"),
  },
  {
    path: "/LawView",
    name: "LawView",
    component: () => import("../views/LawView.vue"),
  },
  {
    path: "/movie/index",
    name: "movie",
    component: () => import("../views/MovieView.vue"),
  },

  {
    path: "/house/index",
    name: "house",
    component: () => import("../views/HouseView.vue"),
  },
  {
    path: "/house/detail",
    name: "detail",
    component: () => import("@/components/house/HouseDetailView.vue"),
  },
  {
    path: "/metro_query/index",
    name: "metroindex",
    component: () => import("../views/metro/MetroView.vue"),
  },
  {
    path: "/metro_query/opinion",
    name: "metroopinion",
    component: () => import("../views/metro/MetroOpinion.vue"),
  },
  {
    path: "/metro_query/opinion/detail/:id",
    name: "metroopiniondetail",
    component: () => import("../views/metro/MetroOpinionDetail.vue"),
  },
  {
    path: "/metro_query/info",
    name: "metroinfo",
    component: () => import("../views/metro/MetroInfo.vue"),
  },
  {
    path: "/metro_query/info/list/:id",
    name: "metroinfolist",
    component: () => import("../views/metro/MetroInfoList.vue"),
  },
  {
    path: "/metro_query/card",
    name: "metrocard",
    component: () => import("../views/metro/MetroCard.vue"),
  },
  {
    path: "/metro_query/notice",
    name: "metronotice",
    component: () => import("../views/metro/MetroNotice.vue"),
  },
  {
    path: "/metro_query/found",
    name: "metrofound",
    component: () => import("../views/metro/MetroFound.vue"),
  },
  {
    path: "/metro_query/line",
    name: "metroline",
    component: () => import("../views/metro/MetroLine.vue"),
  },
  {
    path: "/metro_query/record",
    name: "metrorecord",
    component: () => import("../views/metro/MetroRecord.vue"),
  },
  {
    path: "/government/index",
    name: "governmentindex",
    component: () => import("../views/government/GovernmentView.vue"),
  },
  {
    path: "/government/detail/:id",
    name: "governmentdetail",
    component: () => import("../views/government/GovernmentDetail.vue"),
  },
  {
    path: "/government/mine",
    name: "governmentmine",
    component: () => import("../views/government/GovernmentMine.vue"),
  },
  {
    path: "/cook/index",
    name: "cookindex",
    component: () => import("../views/cook/CookView.vue"),
  },
  {
    path: "/cook/detail/:id",
    name: "cookdetail",
    component: () => import("../views/cook/CookDetail.vue"),
  },
  {
    path: "/cook/mine",
    name: "cookmine",
    component: () => import("../views/cook/CookMine.vue"),
  },

  {
    path: "/indexVue",
    name: "indexVue",
    component: () => import("@/components/movie/indexVue.vue"),
  },
  {
    path: "/lookMovie",
    name: "lookMovie",
    component: () => import("@/components/movie/lookMovie.vue"),
  },
  {
    path: "/TicketView",
    name: "TicketView",
    component: () => import("@/components/movie/TicketView.vue"),
  },
  {
    path: "/peopleView",
    name: "peopleView",
    component: () => import("@/components/expertise/peopleView.vue"),
  },
  {
    path: "/LawyerDetails",
    name: "LawyerDetails",
    component: () => import("@/components/expertise/LawyerDetails.vue"),
  },
  {
    path: "/ZixunLvs",
    name: "ZixunLvs",
    component: () => import("@/components/expertise/ZixunLvs.vue"),
  },
  {
    path: "/AlllawView",
    name: "AlllawView",
    component: () => import("@/components/expertise/AlllawView.vue"),
  },
  {
    path: "/GoodpepleView",
    name: "GoodpepleView",
    component: () => import("@/components/expertise/GoodpepleView.vue"),
  },
  {
    path: "/CategOrized",
    name: "CategOrized",
    component: () => import("@/components/classify/CategOrized.vue"),
  },
  {
    path: "/GarbageSorting",
    name: "GarbageSorting",
    component: () => import("@/components/classify/GarbageSorting.vue"),
  },
  {
    path: "/designateView",
    name: "designateView",
    component: () => import("@/components/classify/designateView.vue"),
  },
  {
    path: "/commentsView",
    name: "commentsView",
    component: () => import("@/components/classify/commentsView.vue"),
  },
  {
    path: "/bus_query/custom_shuttle",
    name: "bus",
    component: () => import("@/views/BusView.vue"),
  },
  {
    path: "/bus_query/detail",
    name: "busLineDetail",
    component: () => import("@/components/bus/LineDetailView.vue"),
  },
  
  ...LogisticsRouter,
  ...libraryRoute,
  ...TakeawayRouter,
];

const router = new VueRouter({
  routes,
});

export default router;
